var loadModalInstance = null;
var loadCount = 0;
function LoadModal(uibModal) {
    loadCount++;
    console.log("请求启动遮罩..." + loadCount);
    if (loadModalInstance != null) {
        return
    }
    console.log("启动遮罩...");
    loadModalInstance = uibModal.open({
        animation: true,
        templateUrl: 'LoadConfirm.html',
        keyboard: false,
        backdrop: 'static'
    });
}

function closeModal() {
    loadCount--;
    console.log("请求关闭遮罩..." + loadCount);
    if (loadModalInstance != null && loadCount <= 0) {
        console.log("关闭遮罩...");
        loadModalInstance.close();
        loadModalInstance = null;
        loadCount = 0;
    }
}